<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>index</title>
</head>

<body>
    <div id="location"></div>
    <script>
        let div = document.getElementById('location').textContent = location.search;
        // console.log(div);
        let a = div.length;
        let b = div.indexOf("=");
        let newDiv = div.substr(b+1, a-b);
        console.log(newDiv);
       document.getElementById('location').textContent= "欢迎,"+newDiv;


       let text = window.sessionStorage.getItem('input');
        document.getElementById('sessionInfo').innerHTML = text;
    </script>
</body>

</html>